import instance from "../utils/request";
/**
 * 获取用户列表
 * @param params 
 * @returns 
 */
export const getUsersList = (params: any) => instance.get("/api/v1/admin/user", { params });
/**
 * 修改用户信息
 * @param id 
 * @param data 
 * @returns 
 */
export const putUser = (id: string, data: any) => instance.put("/api/v1/admin/user/" + id, data);
/**
 * 删除用户
 * @param id 
 * @returns 
 */
export const delUser = (id: string) => instance.delete("/api/v1/admin/user/" + id);
/**
 * 获取用户购物车列表
 * @param id 
 * @returns 
 */
export const userCart = (id: any) => instance.get("/api/v1/admin/cart/info", { params: id });
/**
 * 删除用户购物车
 * @param id 
 * @returns 
 */
export const delUserCart = (id: string) => instance.delete("/api/v1/admin/cart/" + id);
/**
 * 获取用户积分记录
 * @param id 
 * @returns 
 */
export const userScore = (id: string) => instance.get("/api/v1/admin/scorelog/info", { params: id });
